<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>事件循环</title>
</head>
<body>
  <button id="button">点击事件</button>
</body>
<!-- <script src="4.js"></script> -->
<script src="7.js"></script>
<!-- <script>
  console.log(Date.now())
  setTimeout(() => {
    console.log(4.1)
    setTimeout(() => {
      console.log(4.12)
    }, 0)
  }, 2000)
  setTimeout(() => {
    console.log(4.3)
    setTimeout(() => {
      console.log(4.13)
    }, 0)
  }, 1000)
  new Promise((resolve) => {
    resolve()
  }).then(() => {
    console.log(2)
  })
  console.log(1)
  document.onclick = () => {
    console.log('click')
  }
  let a = 0
  for (var i = 0; i < 1000000000; i++) {
    a+=i
  };
</script> -->
<!-- 
<script>
  document.onclick = () => {
    console.log('click2')
  }
  console.log(3)
  setTimeout(() => {
    console.log(4.2)
  }, 0)
  console.log(Date.now())
</script> -->
</html>